#include<bits/stdc++.h>
using namespace std;
int main()
{
	int x, y;
	cin>>x>>y;
	if(x%2 && y%2)
		cout<<x*x<<" "<<y*y;
	else if(!(x%2) && !(y%2))
		cout<<x*x*x<<" "<<y*y*y;
	else
		cout<<x<<" "<<y;
    return 0;
}

